<template>
  <div class="deleteSuccess">
    <a-result
      status="success"
      title="Deleteted successfully"
      :sub-title="subTitle"
    >
      <template #extra>
        <a-button type="primary" @click="gotoHome">Back Home</a-button>
      </template>
    </a-result>
  </div>
</template>

<script setup lang="ts">
import { onBeforeMount, ref } from "vue";
import { useRoute, useRouter } from "vue-router";

const subTitle = ref("");
const router = useRouter();
const route = useRoute();
const loadData = () => {
  const id = route.params.category;
  subTitle.value = `Article id: ${id} is deleted success, please wait, cloud server configuration takes 1 minute.`;
};
onBeforeMount(()=>{
  loadData();
})
const gotoHome = () => {
  router.push("/search/post");
};
</script>

<style scoped>
.deleteSuccess {
  height: 100%;
  justify-content: center;
  align-items: center;
}
</style>
